package com.example.demo9.service;

import com.example.demo9.mapper.CartMapper;
import com.example.demo9.pojo.Cart;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;
@Service
public class CartServiceImpl implements CartService {
  @Autowired
    CartMapper cartMapper;
    @Override
    public List<Cart> getCart(String userid) {
        return cartMapper.getCartByUserid(userid);
    }

    @Override
    public int addCart(Cart cart) {
        return cartMapper.addCart(cart);
    }
}
